package com.aaa.sso.feign;

import com.aaa.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

//使用远程调用 必须要使用feign注解
//value = ""指的是微服务的名称
@FeignClient(value = "his-open-system")
public interface UserFeign  {
    //服务与服务之间的调用 返回的是实体类  前端返回的result
    @GetMapping("/system/user/getByUsername/{username}")
    public User getByUsername(@PathVariable String username);
}
